package jpb.util;

/**
 * Created by haol on 2017/4/17.
 */
public class IndexUtil {

        public static int getINDEX(String value, String[] str) {
                for (int i = 0; i < str.length; i++) {
                        if (value.equals(str[i])) {
                                return i;
                        }
                }
                return -1;
        }

        public static String getBrack(String str,int i){
                int lb = str.indexOf('(');
                int rb = str.indexOf(')');
                if (i == 0){
                        return str.substring(0,lb);
                }else {
                        return str.substring(lb+1,rb);
                }
        }
}
